<?php
$_menu_sidebar='';
foreach($children as $one){
    $_one_url=$this->createUrl('cate/list',array('pid'=>$one->pid,'cid'=>$one->cid));

    $_menu["$one->name"]=$_one_url;
    if($one->pid==$current->pid && $one->cid==$current->cid){
        $_menu_sidebar.='<li class="m"><span class="first"></span><a href="'.$_one_url.'">'.$one->name.'</a></li>';
    }else{
        $_menu_sidebar.='<li><span></span><a href="'.$_one_url.'">'.$one->name.'</a></li>';
    }


}
$this->breadcrumbs=$_menu;

$this->pageTitle=Yii::app()->name . ' - '.$article->title;

?>
<div class="subpageContainer">
    <div class="left">
        <!--标题-->
        <div class="k-title sub-title">
            <div class="l"><?php echo $current->parent->name; ?></div>
            <div class="r"></div>
        </div>
        <!--列表内容-->
        <div class="subpage-left-content">
            <ul class="leftmenu black">
                <?php echo $_menu_sidebar; ?>
            </ul>
        </div>
        <!--底部圆角-->
        <div class="k-fot sub-fot"> <span class="fotright"></span> </div>
        <!--圆角结束-->
    </div>
    <div class="right">
        <div class="detailContent-title">
            <?php if(isset($this->breadcrumbs)):?>
                <?php $this->widget('zii.widgets.CBreadcrumbs', array(
                'htmlOptions'=>array('class'=>'local'),
                'separator'=>'&nbsp;&gt;&nbsp;',
                'links'=>array(
                    $current->parent->name=>$this->createUrl('cate/list',array('pid'=>$current->pid)),
                    $current->name=>$this->createUrl('cate/list',array('pid'=>$current->pid, 'cid'=>$current->cid))
                ),
                'homeLink'=>'当前位置',
                'tagName'=>'span',
            )); ?><!-- breadcrumbs -->
            <?php endif?>
        </div>
        <ul class="detailContent">
            <div class="artilce-title">
                <h5><?php echo $article->title;?></h5>
                <p><?php echo $article->excerpt;
                    $p=Profiles::model()->findByPk($article->user->id);
                    ?></p>
                <p><span>出自：<?php echo isset($p->nickname) ? $p->nickname : '';?></span><span>上传时间：<?php echo substr($article->createtime,0,10);?></span><span>点击次数:<?php echo $article->clicknumber;?>次</span></p>
            </div>
            <div class="det">
                <?php echo $article->content;?>
            </div>
            <?php if(isset($type) && $type==1): ?>
            <div class="next black">
                <span class="l" style="clear: both;">上一条:<?php echo (isset($article_prev->aid)) ? '<a href="'.Yii::app()->createUrl('article/view', array('type'=>1, 'id'=>$article_prev->aid)).'">'.$article_prev->title.'</a>': '无'?></span>
                <span class="l" style="clear: both;">下一条:<?php echo (isset($article_next->aid)) ? '<a href="'.Yii::app()->createUrl('article/view', array('type'=>1, 'id'=>$article_next->aid)).'">'.$article_next->title.'</a>': '无'?></span>
            </div>
            <?php endif; ?>
        <div class="clear"></div>
        </ul>
    </div>
    <div class="clear"></div>
</div>